﻿// Hazel/src/Renderer/VertexArray.h
#pragma once

#include "Renderer/Buffer.h"
#include "Hazel.h" // 包含 Ref

namespace Hazel
{

    class VertexArray
    {
    public:
        virtual ~VertexArray() = default;

        virtual void Bind() const = 0;
        virtual void Unbind() const = 0;

        virtual void AddVertexBuffer(const Ref<VertexBuffer> &vb) = 0;
        virtual void SetIndexBuffer(const Ref<IndexBuffer> &ib) = 0;

        virtual const std::vector<Ref<VertexBuffer>> &GetVertexBuffers() const = 0;
        virtual const Ref<IndexBuffer> &GetIndexBuffer() const = 0; // ← 必须有这个！

        static Ref<VertexArray> Create();
    };

}